package com.singbon.server.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 */
@Controller
public class LoginController {
  @RequestMapping("/login")
  public String login() {
    return "login";
  }
  @RequestMapping("/")
  public String requestRoot(HttpServletRequest request, HttpServletResponse response) {
    System.out.println("r:" + request.getRequestURI());
    return "login";
  }
  //  @RequestMapping("/zk0vxsxuq7/")
  //  public String requestSe(HttpServletRequest request, HttpServletResponse response) {
  //    System.out.println("se:" + request.getRequestURI());
  //    return "login";
  //  }
  //  /**
  //   * http://127.0.0.1:8080
  //   * /zk0vxsxuq7/oauth/authorize
  //   * ?client_id=su&redirect_uri=http://localhost:8082/login&response_type=code&state=G1zUWH
  //   */
  //  @RequestMapping("/zk0vxsxuq7/oauth/authorize")
  //  public String authorize(HttpServletRequest request, HttpServletResponse response) {
  //    System.out.println("se1 = " + request.getRequestURI());
  //    return "login";
  //  }
  //  此url会造成无法登录
  //    @RequestMapping("/oauth/authorize")
  //    public String authorize2(HttpServletRequest request, HttpServletResponse response) {
  //      System.out.println("se2 = " + request.getRequestURI());
  //      return "login";
  //    }
}
